package com.simtop.domain.news;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.simtop.domain.BaseEntity;
import lombok.Data;
import org.apache.ibatis.type.Alias;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * @author lvyongwei
 * @description 政策资讯
 */
@Data
@Alias("policyInformation")
public class PolicyInformation extends BaseEntity {

    /**
     * 政策资讯id
     */
    private Long policyId;

    /**
     * 政策标题
     */
    @NotBlank(message = "新闻标题不能为空")
    private String policyTitle;

    /**
     * 政策封面
     */
    private String policyPhoto;

    /**
     * 政策简介
     */
    @NotBlank(message = "新闻简介不能为空")
    private String policyIntro;

    /**
     * 政策详情
     */
    private String policyContent;

    /**
     * 附件(未要求，提前准备)
     */
    private String policyAccessory;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 新闻发布日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date pubdate;
}
